PPI - A Portable Prolog Interface for Java

نویسندگان

  • Ludwig Ostermayer
  • Frank Flederer
  • Dietmar Seipel
چکیده

As a first step to combine the two programming paradigms – objectoriented programming and logic programming – we have introduced a generic default mapping for JAVA objects and PROLOG terms. This mapping can be used without any modification to the JAVA classes that stand behind the objects. We also can generate automatically JAVA classes from predicates in PROLOG that map to each other. Apart from the default mapping it is further possible to customise the mapping by JAVA annotations. This allows for different Prolog-Views on a given class in JAVA. The data exchange format between JAVA and PROLOG is a simple textual representation of the JAVA objects and of the terms in PROLOG. Because this textual representation already conforms PROLOG’s syntax, it can be directly used within PROLOG. In a second step we have to develop the link between JAVA and PROLOG that executes the mapping and communication. We already have presented a connector architecture for PROLOG and JAVA and an example interface that successfully uses our object term mapping with high performance. However, this interface depends heavily on a single PROLOG implementation: SWI-PROLOG. But as we have a generic mapping between JAVA objects and PROLOG terms, we also strive for an interface that also is generic and can be used independently of the PROLOG implementation. In this paper, we present the Portable Prolog Interface (PPI) for JAVA that uses the standard streams stdin, stdout and stderr to communicate with a PROLOG instance. Because these standard streams are available for all popular operating systems and are used by most of the PROLOG implementations for the user interaction, the PPI works for a broad range of PROLOG implementations. We evaluate our new generic interface PPI with different PROLOG engines and without changing the underlying JAVA or PROLOG source code of our tests.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Seamless Cooperation of Java and Prolog for Rule-Based Software Development

Modern software often relies on the modular combination of several software subsystems, for instance rule-based subsystems for decision support, verification or knowledge management. Different software libraries in potentially different programming languages have to work together in just a single application. Even more complex is the case when different programming paradigms are combined. Such ...

متن کامل

An agent-based architecture for multi-user applications

The main problem addressed in this paper is the heavy-weighted processes involved in the dialogue management and knowledgebased tasks that support the user-agent interaction according with the user needs and the dialogue evolution. The approach followed in the deployed system has been a two-sided double communication solution, based on the different functionalities of the agents in either side,...

متن کامل

InterProlog: Towards a Declarative Embedding of Logic Programming in Java

InterProlog is the first Prolog-Java interface to support multiple Prolog systems through the same API; currently XSB and SWI Prolog, with GNU Prolog and YAP under development – on Windows, Linux and Mac OS X. It promotes coarse-grained integration between logic and object-oriented layers, by providing the ability to bidirectionally map any class data structure to a Prolog term; integration is ...

متن کامل

A Most Specific Method Finding Algorithm for Reflection Based Dynamic Prolog-to-Java Interfaces

In the context of direct and reflection based extension mechanisms for the Jinni 2000 Java based Prolog system, we discuss the design and the implementation of a reflection based Prolog to Java interface. While the presence of dynamic type information on both the Prolog and the Java sides allows us to automate data conversion between method parameters, the presence of subtyping and method overl...

متن کامل

KLMLean 1.0: a Theorem Prover for Logics of Default Reasoning

In this paper we present KLMLean 1.0, a theorem prover for some logics of default reasoning, namely Preferential logic P and Loop-Cumulative logic CL introduced by Kraus, Lehmann, and Magidor. KLMLean 1.0 implements some tableaux calculi for these logics recently introduced. It is implemented in SICStus Prolog and also comprises a graphical user interface written in Java. KLMLean 1.0 is availab...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014